import request from '@/utils/request'

// 查询投标保函列表
export function listBidding(query) {
  return request({
    url: '/guarantee/bidding/list',
    method: 'get',
    params: query
  })
}

// 查询投标保函详细
export function getBidding(id) {
  return request({
    url: '/guarantee/bidding/' + id,
    method: 'get'
  })
}

// 新增投标保函
export function addBidding(data) {
  return request({
    url: '/guarantee/bidding',
    method: 'post',
    data: data
  })
}

// 修改投标保函
export function updateBidding(data) {
  return request({
    url: '/guarantee/bidding',
    method: 'put',
    data: data
  })
}

// 删除投标保函
export function delBidding(id) {
  return request({
    url: '/guarantee/bidding/' + id,
    method: 'delete'
  })
}

// 提交投标保函
export function tijiaoBidding(id) {
  return request({
    url: '/guarantee/bidding/tijiao/' + id,
    method: 'post'
  })
}

// 查询历史投标保函列表
export function historyList(query) {
  return request({
    url: '/guarantee/bidding/historyList',
    method: 'get',
    params: query
  })
}
